home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 1458 < prev    next >
Encoding:
Text File  |  1996-08-06  |  1.4 KB  |  44 lines

  1. Newsgroups: comp.lang.c++
  2. Path: howland.reston.ans.net!torn!nott!cunews!wabakimi!abelo
  3. From: abelo@chat.carleton.ca (Andrew Belo)
  4. Subject: Using multiple functions in one file
  5. X-Nntp-Posting-Host: wabakimi.carleton.ca
  6. Message-ID: <DL00rI.HFr@cunews.carleton.ca>
  7. Sender: news@cunews.carleton.ca (News Administrator)
  8. Organization: Carleton University
  9. X-Newsreader: TIN [version 1.2 PL2]
  10. Date: Thu, 11 Jan 1996 04:06:54 GMT
  11.  
  12.  
  13. I have written an example program out of a book and it keeps giving me an
  14. error that says "Call to undefined function 'butler' in function main()" 
  15. I am using Borland C++ for Dos, Win and Win 32 Version 4.5.
  16.  
  17. The book is called C: Step by Step, and the program is as follows.
  18.  
  19. /* two_func.c -- a program using two functions in one file */ 
  20. #include <stdio.h>
  21. main()
  22. {
  23.     printf("I will summon the butler function. \n");
  24.     butler();
  25.     printf("Yes. Bring me some tea and floppy disks.\n");  
  26. }
  27. butler()
  28. {
  29. printf("You rang, sir? \n");
  30. }
  31.  
  32. Thanx
  33.  
  34.  
  35. ----------------------------------------------------------------------------
  36. Andrew Belo           |  WARNING: Yes this message has spelling mistakes but 
  37. 1st Year Computer Sci |  learn to live with it!!!!!!!!
  38. Carleton University   ------------------------------------------------------  
  39. Email address: abelo@chat.carleton.ca
  40.                ai806@FreeNet.Carleton.CA
  41. Home Page:     chat.carleton.ca/~abelo
  42. ----------------------------------------------------------------------
  43.  
  44.